import Http from '../http/http'


/**
 * 发送验证码
 * @param config
 * @returns {*}
 */
export function sendCaptcha(phone:string, type:string):Promise<any>{ return Http.post('/captcha/sendSms',
	{
		data:{
			phone,
			type
		}
	}
)};

/**
 * 验证码登录
 */
export function smsLogin(config:any):Promise<any>{
	config.anonymous = true;
	return Http.post('/sms/login', config)
}

	/**
	 * 登录
	 */
export function login(config:any):Promise<any>{
	config.anonymous = true;
	return Http.post('/login', config)
}



  /**
     * 初始化
     */
export function initial(config:any):Promise<any> { return Http.get('/app/initial', config) }






